package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.DeviceBatch;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DeviceBatchMapper;
import com.ruoyi.system.service.IDeviceBatchService;
import com.ruoyi.common.core.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-13
 */
@Service
public class DeviceBatchServiceImpl implements IDeviceBatchService 
{
    @Autowired
    private DeviceBatchMapper deviceBatchMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param batchId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public DeviceBatch selectDeviceBatchByBatchId(Long batchId)
    {
        return deviceBatchMapper.selectDeviceBatchByBatchId(batchId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param deviceBatch 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<DeviceBatch> selectDeviceBatchList(DeviceBatch deviceBatch)
    {
        return deviceBatchMapper.selectDeviceBatchList(deviceBatch);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param deviceBatch 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertDeviceBatch(DeviceBatch deviceBatch)
    {
        deviceBatch.setCreateTime(DateUtils.getNowDate());
        return deviceBatchMapper.insertDeviceBatch(deviceBatch);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param deviceBatch 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateDeviceBatch(DeviceBatch deviceBatch)
    {
        deviceBatch.setUpdateTime(DateUtils.getNowDate());
        return deviceBatchMapper.updateDeviceBatch(deviceBatch);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param batchIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteDeviceBatchByBatchIds(String batchIds)
    {
        return deviceBatchMapper.deleteDeviceBatchByBatchIds(Convert.toStrArray(batchIds));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param batchId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteDeviceBatchByBatchId(Long batchId)
    {
        return deviceBatchMapper.deleteDeviceBatchByBatchId(batchId);
    }
}
